<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    {% block title %}
        <title>图书管理系统</title>
    {% endblock %}
        <link href="../../static/css/bootstrap.min.css" rel="stylesheet">
        <script src="../../static/js/jquery-3.5.1.min.js"></script>
        <script src="../../static/js/bootstrap.bundle.min.js"></script>
    {% block head %}

    {% endblock %}
</head>
<body>
    <nav class="navbar navbar-expand-lg navbar-light">
      <a class="navbar-brand" href="#">图书馆后台</a>
      <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarText" aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
      </button>
      <div class="collapse navbar-collapse" id="navbarText">
        <ul class="navbar-nav mr-auto">
          <li class="nav-item active">
            <a class="nav-link" href="{{url_for("cms.cms_index")}}">首页 </a>
          </li>
          {% if g.user.role_id==1 or g.user.role_id == 2 %}
          <li class="nav-item">
            <a class="nav-link" href="{{url_for("cms.cms_book_home")}}">图书管理</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="{{url_for("cms.board_index")}}">分类管理</a>
          </li>
          {% endif %}
          {% if g.user.role_id ==2 %}
            <li class="nav-item">
             <a class="nav-link" href="{{url_for("cms.cms_userFront")}}">前台用户</a>
           </li>
          <li class="nav-item">
            <a class="nav-link" href="{{ url_for("cms.cms_user") }}">后台管理</a>
          </li>
          {% endif %}
        </ul>
        <span class="navbar-text">
            <ul class="navbar-nav mr-auto">
                <li class="nav-item">
                    <a class="nav-link" href="{{url_for("front.index")}}">前台首页</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="#">{{ g.user.username }}</a>
                </li>
           </ul>
        </span>
      </div>
    </nav>
    {% block body %}

    {% endblock %}
</body>
</html>